package com.ruoyi.novel.controller;

import com.ruoyi.novel.config.OssUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/oss")
public class OssController {
    @Autowired
    private OssUtil ossUtil;

    @PostMapping("/show")
    public String show(@RequestBody MultipartFile file) {
        return ossUtil.uploadMultipartFile(file);
    }
}
